﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZhouYu.DreamTour.Model;

namespace ZhouYu.DreamTour.DAL.IRepository
{
    public interface IUserRepository:IDenpendecyRepository
    {
        // 用户登录方法
        UserInfo LoginUserInfo(UserInfo userInfo);

        // 修改上一次登录时间和当前登录IP
        int UpdateLoginTime(UserInfo userInfo);

        // 用户手机注册
        int AddUserInfo(UserInfo userInfo);

        //用户邮箱注册
        int AddUserEmailInfo(UserInfo userInfo);

        //查询邮箱验证码是否存在
        int CheckEmailCode(EmailInfo emailInfo);

        //添加邮箱发送记录
        int AddEmailInfo(EmailInfo emailInfo);

        //查询邮箱是否存在
        int CheckUser_Email(UserInfo userInfo);

        // 查询手机号方法
        int CheckUserTel(UserInfo userInfo);
        /// <summary>
        /// 根据父Id查询网站底部导航展示数据
        /// </summary>
        /// <param name="ColumnId"></param>
        /// <returns></returns>
        List<Webcolumn> QueryColumn(int  ColumnId);

        /// <summary>
        /// 根据版权名查询网站信息
        /// </summary>
        /// <param name="Copyright"></param>
        /// <returns></returns>
        Website QueryWebsite(string Copyright);
        /// <summary>
        /// 修改当前用户密码
        /// </summary>
        /// <returns></returns>
         int Changepwd(string Pwd,int UserId);

        /// <summary>
        /// 获取地址列表
        /// </summary>
        /// <returns></returns>
        List<DeliveryAddress> AddressList(int UserId);

        /// <summary>
        /// 获取积分列表
        /// </summary>
        /// <param name="Createtime"></param>
        /// <param name="Effective"></param>
        /// <param name="IntegralName"></param>
        /// <returns></returns>
        List<Custompoints> IntegralList(string Createtime, string Effective,int UserId);

        ///<summary>
        ///根据Id删除配送地址
        ///</summary>
        ///<returns</resturns>
        int DeleteAddress(int Id);

        /// <summary>
        /// 增加配送地址
        /// </summary>
        /// <param name="address"></param>
        /// <returns></returns>
        int AddAddress(DeliveryAddress address);


        /// <summary>
        /// 修改配送地址
        /// </summary>
        /// <param name="address"></param>
        /// <returns></returns>
        int UpdateAddress(DeliveryAddress address);


        /// <summary>
        /// 根据Id查询用户积分
        /// </summary>
        /// <param name="Name"></param>
        /// <returns></returns>
        Custompoints Queryintegral(int Id);


        /// <summary>
        /// 根据Id查询待点评次数
        /// </summary>
        /// <param name="UserId"></param>
        /// <returns></returns>
         Usercomment QueryUsertobecommentedon(int  UserId);

        /// <summary>
        /// 根据id查询用户信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        UserInfo GetUserById(int id);

        /// <summary>
        /// 根据id查询用户现金账户信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Cashnumber GetCashById(int id);

        /// <summary>
        /// 根据id查询用户订单信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        List<OrderInfo> GetOrderById(int id);

        /// <summary>
        /// 根据id查询用户抵用卷信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        List<VoucherInfo> GetVoucherById(int id);

        /// <summary>
        /// 根据主键查询抵用卷余额信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Voucher GetVoucherByKey(int id);

        /// <summary>
        /// 修改用户抵用卷余额
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        int EditUserVoucher(UserInfo user);


        /// <summary>
        /// 修改抵用卷状态
        /// </summary>
        /// <param name="voucher"></param>
        /// <returns></returns>
        int EditVoucherState(Voucher voucher);


        /// <summary>
        /// 根据用户id查询旅游卷信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        List<TouristVolInfo> GetTourVo(int id);


        /// <summary>
        /// 根据主键查询旅游卷额卷信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Travelvo GetTravelVoByKey(int id);

        /// <summary>
        /// 修改用户旅游卷余额
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int EditUserTravelVo(UserInfo user);


        /// <summary>
        /// 修改旅游卷状态
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int EditTravelVoState(Travelvo travelvo);

        /// <summary>
        /// 校验旅游卷密码是否正确
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int CheckTravelVoPwd(Travelvo travelvo);


        /// <summary>
        /// 获取用户旅游订单集合
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        List<OrderInfo> GetTourOrder(int id);

        /// <summary>
        /// 获取用户团购订单集合
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        List<OrderInfo> GetGroupOrder(int id);


        /// <summary>
        /// 获取用户餐饮订单集合
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        List<OrderInfo> GetCateringOrder(int id);

        /// <summary>
        /// 获取用户酒店订单集合
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        List<OrderInfo> GetHotelOrder(int id);


        /// <summary>
        /// 获取用户特产订单集合
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        List<OrderInfo> GetGoodsOrder(int id);
        /// <summary>
        /// 根据拥护ID查询现金账号表
        /// </summary>
        /// <param name="User_Id"></param>
        /// <returns></returns>
        Cashnumber GetCashnumber(int User_Id);

        /// <summary>
        /// 获取发起人信息表最后一条记录的主键
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Originator GetOriginatorLast();

        /// <summary>
        /// 获取结伴同行表最后一条记录的主键
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Colleague GetColleagueLast();

        /// <summary>
        /// 添加发起人信息表
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int AddOriginator(Originator originator);


        /// <summary>
        /// 添加结伴同行表
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int AddColleague(Colleague colleague);

        /// <summary>
        /// 添加结伴同行人数表
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int AddNumbers(Number number);

        /// <summary>
        /// 获取返现现金账号信息记录
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        List<CashInfo> GetCashReturn(int id);


        /// <summary>
        /// 获取提现现金账号信息记录
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        List<CashInfo> GetCash(int id);



        /// <summary>
        /// 获取返现现金账号信息记录
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        CashInfo GetCashReturnCount(int id);


        /// <summary>
        /// 获取提现现金账号信息记录
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        CashInfo GetCashCount(int id);


        /// <summary>
        /// 获取用户现金账户余额
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Cashnumber GetCashbalance(int id);


        /// <summary>
        /// 添加提现记录
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int AddCashOut(CashOut cash);

        /// <summary>
        /// 添加现金帐号操作记录
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int AddCashnumber_record(Cashnumber_record cashnumber_Record);

        /// <summary>
        /// 修改现金账号余额
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int EditCashBalance(Cashnumber cashnumber);

        /// <summary>
        /// 充值现金账号添加余额
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int RechargeCashBalance(Cashnumber cashnumber);

        /// <summary>
        /// 查询审核未通过的信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        List<GetCashUser> QueryExamine();

        /// <summary>
        /// 提现审核通过
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int AuditPass();


        /// <summary>
        ///根据用户Id查询用户提问记录
        /// </summary>
        /// <param name="UserId"></param>
        /// <returns></returns>
        List<Questions> Queryuserask(int UserId);
        /// <summary>
        ///根据用户Id查询用户回复记录
        /// </summary>
        /// <param name="UserId"></param>
        /// <returns></returns>
        List<Reply> QueryReply(int UserId);

       

        //查询用户已点评
        List<Usercomment> Querycomment(int userId);
        //删除用户点评
        int Deletecomments(int id);

        //修改地址状态
        int Modifyaddressstatus(int Id);
        //修改地址状态全部为0
        int UpdateAlladdressStates(int UserId);


        /// <summary>
        /// 添加旅游卷
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int AddTravelVo(Travelvo travelvo);


        /// <summary>
        /// 查询当前用户申请的结伴同行集合
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        List<Colleague> GetColleagueByUId(Colleague colleague);


        /// <summary>
        /// 修改用户基本信息
        /// </summary>
        /// <param name="userInfo"></param>
        /// <returns></returns>
        int EditUserInfo(UserInfo userInfo);

        /// <summary>
        /// 修改用户手机号
        /// </summary>
        /// <param name="userInfo"></param>
        /// <returns></returns>
        int EditUserTel(UserInfo userInfo);

        /// <summary>
        /// 修改用户邮箱
        /// </summary>
        /// <param name="userInfo"></param>
        /// <returns></returns>
        int EditUserEmail(UserInfo userInfo);

        /// <summary>
        /// 获取现金账号操作表最后一条记录的主键
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Cashnumber_record GetCashRecordLast();


        /// <summary>
        /// 增加账户冻结金额
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int AddCashFreeze(Cashnumber cashnumber);


        /// <summary>
        /// 查询审核未通过的账户id和操作金额
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        List<CashInfo> QueryExamineCashId();


        /// <summary>
        /// 减少账户冻结金额
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int ReduceCashFreeze(CashInfo cashInfo);

        #region 根据ID查询用户信息
        /// <summary>
        /// 根据ID查询用户信息
        /// </summary>
        /// <param name="User_Id"></param>
        /// <returns></returns>
        UserInfo SelUserInfoById(int User_Id);
        #endregion

        /// <summary>
        /// 查询所有结伴同行集合
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        List<Colleague> GetColleague();


        #region 绑定银行卡
        /// <summary>
        /// 绑定银行卡
        /// </summary>
        /// <param name="User_Id"></param>
        /// <returns></returns>
        int BindBank(User_Bank user_Bank);
        #endregion


        #region 获取当前登录用户绑定的银行卡集合
        /// <summary>
        /// 获取当前登录用户绑定的银行卡集合
        /// </summary>
        /// <param name="User_Id"></param>
        /// <returns></returns>
        List<User_Bank> QueryUserBank(User_Bank user_Bank);
        #endregion


        #region 解绑指定银行卡
        /// <summary>
        /// 解绑指定银行卡
        /// </summary>
        /// <param name="User_Id"></param>
        /// <returns></returns>
        int DelBank(User_Bank user_Bank);
        #endregion


        /// <summary>
        /// 获取旅游卷最后一条记录的主键
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Travelvo GetTravelVoLast(Travelvo travelvo);

        /// <summary>
        /// 添加旅游卷操作记录
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int AddTravelVoRecord(Travelvo_record travelvo_Record);
    }
}
